package com.huqing.icu.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description swagger配置类
 * @Author huqing
 * @Date 2025/5/5 17:25
 **/
@Configuration
public class SwaggerConfig {

    @Value("${spring.application.name}")
    private String applicationName;

    @Bean
    public OpenAPI globalOpenApi() {
        return new OpenAPI()
                .info(new Info().title("广州租房小程序")
                        .description("接口文档")
                        .version("3.0"));
    }

    /*public OpenAPI openAPI() {
        return new OpenAPI().info(new Info().title(applicationName).description(applicationName + "API文档").version("v3"));
    }*/

    /*private Info apiInfo() {
        return new Info().title(applicationName).description(applicationName+" API文档").version("v1");
    }*/
}
